home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume29 / ssh-1.3 / patch01 next >
Encoding:
Text File  |  1992-04-25  |  7.2 KB  |  222 lines

  1. Newsgroups: comp.sources.misc
  2. From: etxerus@james.ericsson.se (Hans Beckerus LG/THB)
  3. Subject:  v29i088:  ssh-1.3 - Split & Strip appended shell archives, Patch01
  4. Message-ID: <1992Apr26.043017.23265@sparky.imd.sterling.com>
  5. X-Md4-Signature: b9a5ee3b7be6f7288e74896272434f53
  6. Date: Sun, 26 Apr 1992 04:30:17 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: etxerus@james.ericsson.se (Hans Beckerus LG/THB)
  10. Posting-number: Volume 29, Issue 88
  11. Archive-name: ssh-1.3/patch01
  12. Environment: UNIX
  13. Patch-To: ssh-1.3: Volume 28, Issue 117
  14.  
  15. Here is patch 1 for ssh 1.30. It updates version 1.30 to 1.31.
  16.  
  17. When something went wrong while extracting, the last version tended
  18. to hang slightly. This has been fixed now. Also, a warning message
  19. will be displayed when an unexpected end of file is seen.
  20.  
  21.     /Hans
  22. --
  23. #! /bin/sh
  24. # This is a shell archive.  Remove anything before this line, then unpack
  25. # it by saving it into a file and typing "sh file".  To overwrite existing
  26. # files, type "sh file -c".  You can also feed this as standard input via
  27. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  28. # will see the following message at the end:
  29. #        "End of shell archive."
  30. # Contents:  patch1 patchlevel.h
  31. # Wrapped by etxerus@james16 on Wed Apr 22 09:21:58 1992
  32. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  33. if test -f 'patch1' -a "${1}" != "-c" ; then 
  34.   echo shar: Will not clobber existing file \"'patch1'\"
  35. else
  36. echo shar: Extracting \"'patch1'\" \(5061 characters\)
  37. sed "s/^X//" >'patch1' <<'END_OF_FILE'
  38. X*** ssh.c    Tue Apr 21 14:41:41 1992
  39. X--- ssh.new    Wed Apr 22 09:20:45 1992
  40. X***************
  41. X*** 1,4 ****
  42. X! /* @(#)ssh.c 1.30 (HaB) 92/03/17
  43. X   *
  44. X   * NAME:
  45. X   *    ssh
  46. X--- 1,4 ----
  47. X! /* @(#)ssh.c 1.31 (HaB) 92/04/15
  48. X   *
  49. X   * NAME:
  50. X   *    ssh
  51. X***************
  52. X*** 35,41 ****
  53. X   *    not always work properly.
  54. X   *
  55. X   * DATE:
  56. X!  *    1992-03-17
  57. X   *
  58. X   * AUTHOR:
  59. X   *    Hans C. Beckerus         
  60. X--- 35,41 ----
  61. X   *    not always work properly.
  62. X   *
  63. X   * DATE:
  64. X!  *    1992-04-15
  65. X   *
  66. X   * AUTHOR:
  67. X   *    Hans C. Beckerus         
  68. X***************
  69. X*** 78,84 ****
  70. X  #endif
  71. X  
  72. X  #ifdef SCCSID
  73. X! char sccsid[] = "@(#)ssh.c    1.30 (HaB) 92/03/17";
  74. X  #endif
  75. X  
  76. X  enum boolean {     /* Boolean constants */
  77. X--- 78,84 ----
  78. X  #endif
  79. X  
  80. X  #ifdef SCCSID
  81. X! char sccsid[] = "@(#)ssh.c    1.31 (HaB) 92/04/15";
  82. X  #endif
  83. X  
  84. X  enum boolean {     /* Boolean constants */
  85. X***************
  86. X*** 131,136 ****
  87. X--- 131,137 ----
  88. X      int       state = SEARCH;      /* The current state  */
  89. X      int       fc = 0;              /* File part counter  */
  90. X      int       extract = FALSE;     /* Extract/write flag */
  91. X+     int       hitexit = -1;        /* End of part flag   */
  92. X      char     *s;                   /* Read line          */
  93. X      char      fout[7];             /* Output filenames   */
  94. X      register  j = 0;               /* Counter            */
  95. X***************
  96. X*** 151,157 ****
  97. X          }
  98. X          else if (!(strcmp (*argv, "-v"))) {
  99. X              if (!(argn-1)) {     /* Single option */
  100. X!                 puts ("ssh v1.30  (bugs to etxerus@james.ericsson.se)");
  101. X                  exit (0);
  102. X              }
  103. X          }
  104. X--- 152,158 ----
  105. X          }
  106. X          else if (!(strcmp (*argv, "-v"))) {
  107. X              if (!(argn-1)) {     /* Single option */
  108. X!                 puts ("ssh v1.31  (bugs to etxerus@james.ericsson.se)");
  109. X                  exit (0);
  110. X              }
  111. X          }
  112. X***************
  113. X*** 178,185 ****
  114. X          case SEARCH:
  115. X                      for (j = 0; pattern[j][0] != NULL; j++) {
  116. X                          if (!(strncasecmp (s, pattern[j], strlen (pattern[j])))) {
  117. X                              state = START;
  118. X!                             break;    
  119. X                          }
  120. X                      }
  121. X                      if (state != START)
  122. X--- 179,194 ----
  123. X          case SEARCH:
  124. X                      for (j = 0; pattern[j][0] != NULL; j++) {
  125. X                          if (!(strncasecmp (s, pattern[j], strlen (pattern[j])))) {
  126. X+                             if (!extract)
  127. X+                                 hitexit = FALSE;
  128. X+                             else {
  129. X+                                 if ((pipe = popen (SHELL, "w")) == NULL) {
  130. X+                                     fprintf (stderr, "ssh: Cannot create process.\n");
  131. X+                                     exit (1);
  132. X+                                 }
  133. X+                             }
  134. X                              state = START;
  135. X!                             break;
  136. X                          }
  137. X                      }
  138. X                      if (state != START)
  139. X***************
  140. X*** 191,203 ****
  141. X                  fw = fopen (fout, "w");
  142. X                          fprintf (fw, "%s\n", s);
  143. X                      }
  144. X!                     else {
  145. X!                         if ((pipe = popen (SHELL, "w")) == NULL) {
  146. X!                             fprintf (stderr, "ssh: Cannot create process.\n");
  147. X!                             exit (1);
  148. X!                         }
  149. X                          fprintf (pipe, "%s\n", s);
  150. X-                     }
  151. X                      state = INSIDE;
  152. X              break;
  153. X  
  154. X--- 200,207 ----
  155. X                  fw = fopen (fout, "w");
  156. X                          fprintf (fw, "%s\n", s);
  157. X                      }
  158. X!                     else                        
  159. X                          fprintf (pipe, "%s\n", s);
  160. X                      state = INSIDE;
  161. X              break;
  162. X  
  163. X***************
  164. X*** 206,215 ****
  165. X                          if (!extract) {
  166. X                              fprintf (fw, "%s\n", s);
  167. X                              fclose (fw);
  168. X                          }
  169. X                          else {
  170. X                              fprintf (pipe, "%s\n", s);
  171. X!                             pclose (pipe);
  172. X                          }
  173. X                          state = SEARCH;
  174. X                      }
  175. X--- 210,221 ----
  176. X                          if (!extract) {
  177. X                              fprintf (fw, "%s\n", s);
  178. X                              fclose (fw);
  179. X+                             hitexit = TRUE;
  180. X                          }
  181. X                          else {
  182. X                              fprintf (pipe, "%s\n", s);
  183. X!                             if (pclose (pipe))
  184. X!                                 exit (1);
  185. X                          }
  186. X                          state = SEARCH;
  187. X                      }
  188. X***************
  189. X*** 224,227 ****
  190. X--- 230,238 ----
  191. X              j = 0;    /* Reset counter */
  192. X          }
  193. X      }
  194. X+     if (!extract) {
  195. X+         if (!hitexit)
  196. X+             fprintf (stderr, "ssh: Warning, unexpected end of file.\n");
  197. X+     }    
  198. X+     exit (0);                  
  199. X  }
  200. END_OF_FILE
  201. if test 5061 -ne `wc -c <'patch1'`; then
  202.     echo shar: \"'patch1'\" unpacked with wrong size!
  203. fi
  204. # end of 'patch1'
  205. fi
  206. if test -f 'patchlevel.h' -a "${1}" != "-c" ; then 
  207.   echo shar: Will not clobber existing file \"'patchlevel.h'\"
  208. else
  209. echo shar: Extracting \"'patchlevel.h'\" \(21 characters\)
  210. sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE'
  211. X#define PATCHLEVEL 1
  212. END_OF_FILE
  213. if test 21 -ne `wc -c <'patchlevel.h'`; then
  214.     echo shar: \"'patchlevel.h'\" unpacked with wrong size!
  215. fi
  216. # end of 'patchlevel.h'
  217. fi
  218. echo shar: End of shell archive.
  219. exit 0
  220.  
  221. exit 0 # Just in case...
  222.